import java.awt.Font

package layoutVariety
{
	class TextBox (ref:Int) extends Widget(ref)
	{
		private var ta = new scala.swing.TextArea
		
		//Init Widget class object
		jc = ta
		
		//adding proper functionality
		namesToFuncs("text") = setText
		namesToFuncs("font") = setFont
		
		def setText(ref:AnyRef)
		{
			var txt = ref.asInstanceOf[String]
			ta.text = txt
		}
		
		def getText = ta.text
		
		def setFont(ref:AnyRef)
		{
			var tup = ref.asInstanceOf[(String,Int,Int)]
			var name = tup._1
			var style = tup._2
			var size = tup._3
			var f = new Font (name,style,size)
			ta.font = f
		}
		
	}
}